package com.wkm.myapplication.vp

import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter
import com.wkm.myapplication.MainActivity

/**
 * TODO 简要描述
 * @author chaochaowu @ Zebra Inc.
 * @since 12-27-2021
 */
class VPAdapter(activity: MainActivity) : FragmentPagerAdapter(activity.supportFragmentManager) {

    override fun getCount(): Int {
        return 2
    }

    override fun getItem(position: Int): Fragment {
        if (position == 0) {
            return Fragment1()
        } else {
            return Fragment2()
        }
    }
}